﻿using Quick.Common.Components;

namespace Quick.Common.Logging
{
    public static class FileLogUtility
    {
        private static ILogger _logger;

        static FileLogUtility()
        {
            _logger = ObjectContainer.Resolve<ILoggerFactory>().Create("FileLogUtility");
        }

        public static void Debug(object message)
        {
            _logger.Debug(message);

        }

        public static void DebugFormat(string format, params object[] args)
        {
            _logger.DebugFormat(format,  args);
        }

        public static void Inform(string format)
        {
            _logger.Info(format);
        }

        public static void InfoFormat(string format, params object[] args)
        {
            _logger.InfoFormat(format);
        }

        /// <summary>Write an error level log message.
        /// </summary>
        /// <param name="message"></param>
        public static void Error(object message)
        {
            _logger.Error(message);
        }

        /// <summary>Write an error level log message.
        /// </summary>
        /// <param name="format"></param>
        /// <param name="args"></param>
        public static void ErrorFormat(string format, params object[] args)
        {
            _logger.ErrorFormat(format, args);
        }
    }
}
